package com.hq.door.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hq.door.dao.IMajorDao;
import com.hq.door.dao.TMajorDAO;
import com.hq.door.pojo.TMajor;
import com.hq.door.service.IMajorService;

/**
 * 作者：袁健宝
 * 日期：2016年12月30日 上午3:38:55
 */
@Service("majorService")
public class MajorServiceImpl extends BaseServiceImpl<TMajor> implements IMajorService {

	TMajorDAO majorDao;
	
	public TMajorDAO getMajorDao() {
		return majorDao;
	}

	@Autowired
	public void setMajorDao(TMajorDAO majorDao) {
		this.majorDao = majorDao;
		this.setBaseDao(majorDao);
	}

	@Override
	public void save(TMajor entity) {
		majorDao.save(entity);
	}

	@Override
	public void update(TMajor entity) {
		majorDao.update(entity);
	}

	@Override
	public void delete(TMajor entity) {
		majorDao.delete(entity);
	}

	@Override
	public TMajor get(int id) {
		TMajor major = majorDao.get(id);
		return major;
	}

	@Override
	public <TMajor> List<TMajor> findPageObjects(String hql, int pageStart, int pageSize,
			Object... conditions) {
		List<TMajor> list = majorDao.findPageObjects(hql, pageStart, pageSize, conditions);
		return list;
	}

}
